@import "../../style/default";

$selected-color: white;
@import "~@ag-grid-community/core/dist/styles/ag-grid.scss";
@import "~@ag-grid-community/core/dist/styles/ag-theme-balham/sass/ag-theme-balham.scss";

/* 用于动态gird 自动高度使用 */
.ag-theme-height {
  height: 100px; // 产品强烈要求改的，此后不允许再改
}

.ag-root-wrapper {
  overflow: visible !important;
}

.ag-theme-autoHeight .ag-layout-auto-height {
  min-height: 100px; // 产品强烈要求改的，此后不允许再改
}

.ag-header-group-cell-label {
  display: flex;
  justify-content: center !important;
  align-items: center !important;
}

.ag-theme-cell-label .ag-header-cell-label {
  justify-content: center !important;
}


// 定制样式
.ag-theme-balham {
  .grid-tab-warning {
    background-color: #ff6060 !important;
  }

  .grid-tab-breach {
    background-color: #f8cc04 !important;
  }

  .ag-root {
    border: 0 solid #bdc3c7;
  }

  .ag-side-bar {
    border-right: 0;
  }

  .ag-row-hover {
    background-color: $ag-row-hover !important;
  }

  .ag-root-wrapper {
    border: 0px;
  }

  //.ag-row.ag-row-last {
  //  border-bottom-width: 0px;
  //}
  .ag-ltr .ag-cell-focus {
    border-width: 1;
  }

  .ag-body-horizontal-scroll {
    &::-webkit-scrollbar {
      width: 9px;
      height: 9px;
    }
  }

  .ag-cell::after, .ag-group-cell::after {
    border-right: 1px solid transparentize($border-color, 0.5);
    content: " ";
    height: 16px;
    margin-top: 5px;
    position: absolute;
    right: 0;
    text-indent: -2000px;
    top: 0;
  }

  .ag-checkbox-input-wrapper {
    //background-color: $primary-color;
    background-color: $normal-color;

    &::after {
      color: $primary-color !important;
    }
  }

  .ag-selection-checkbox span {
    background-color: $primary-color;
  }

  .ag-icon-checkbox-unchecked {
    background-color: white !important;
  }
}

.ag-cell-value, .ag-group-value {
  width: -webkit-fill-available;
}

.red {
  background-color: #f40d1a !important;
}

.yellow {
  background-color: #f4e31d !important;
}

.selected {
  background-color: $ag-row-selected !important;

  .box-div {
    color: #8e8e8e !important;

    &:hover {
      color: red !important;
      cursor: pointer;
    }
  }
}

.cell-disable {
  background-color: #f7f7f7 !important;
}

.cell-required {
  border-bottom: 1px solid red !important;
}

.cell-color {
  background-color: #fcfdfe !important;
  border-bottom: 1px solid #bdc3c7 !important;
}

.ag-row-hover {
  .ag-cell.ag-column-hover {
    //color: #f5222d;
    .apes-cell-dialog {
      text-decoration-line: underline;

      &::after {
        content: "  \e996";
        font-family: "anticon" !important;
      }
    }
  }

  .cell-disable.ag-column-hover {
    .apes-cell-dialog {
      &::after {
        content: " ";
      }
    }
  }

  .apes-cell-dialog {
    text-decoration-line: underline;
  }
}

.apes-cell-dialog {
  //border: 1px solid red;
  width: 100%;
  height: 100%;
}

// secondary-select 样式
.apes-secondary-select {
  display: none;
}

.multiple-select {
  width: 100%;
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 8px;
  border-top-color: #e6e6e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  /*position: absolute;*/
  .multiple-select-main {
    height: 28px;
    margin: 6px 0;
  }
}

.apes-multiple-select-btn {
  padding: 0 6px;
  /*display: none;*/
  opacity: 0;
}

.apes-multiple-select {
  .apes-input-search:hover {
    .apes-multiple-select-btn {
      /*display: block;*/
      opacity: 1;
    }
  }
}

// 当前行编辑按钮
.ag-editor-button {
  font-size: 15px;
  display: none;
}

.ag-row-hover {
  &:hover, &:focus, &:active {
    .ag-editor-button {
      i {
        &:hover {
          font-weight: bold;
          cursor: pointer;
        }
      }
    }
  }
}

.plus {
  float: left;
  background: url("assets/icons/plus.png") no-repeat;
  //background-repeat: no-repeat, repeat;
  display: block;
  width: 24px;
  height: 24px;

  &:hover {
    background-color: #e1ddc3;
    backdrop-filter: blur();
  }
}

.delete {
  float: left;
  background: url("assets/icons/delete.png") no-repeat;
  //background-repeat: no-repeat, repeat;
  display: block;
  width: 24px;
  height: 24px;

  &:hover {
    background: url("assets/icons/delete-hover.png");
  }
}

.gird-button-badge {
  .apes-badge-dot {
    top: 0px !important;
  }
}

.apes-operating-button {
  .apes-btn {
    color: #13A2FD;
    &[disabled] {
      color: #777;

    }
  }
}

.apes-cell-inputPopover {
  min-width: 50px;
  max-width: 250px;
  word-wrap: break-word;
}
